package S13.second;
public class Person {
	private String name; //姓名
	private String tel; //电话
	public Person(String name,String tel) {
		this.name=name;
		this.tel=tel;
	}
	@Override
	public String toString() {
		return name+"•"+tel;
	}
	@Override
	public boolean equals(Object obj) {
		if(this==obj)return true;
		if(!(obj instanceof Person))return false;
		Person p=(Person)obj;
		return name.equals(p.name) && tel.equals(p.tel);
	}
	@Override
	public int hashCode() {
		return tel.hashCode();
	}
}